#!/bin/bash

# 用户信息
USERNAME="user1"
PASSWORD="pass123"

echo "=== 测试开始 ==="

# 注册用户（如果已注册，可注释掉此行）
echo "注册用户..."
./taskmaster register "$USERNAME" "$PASSWORD"

# 添加任务
echo "添加任务..."
./taskmaster addtask "$USERNAME" "$PASSWORD" --name "项目会议" --start "2025-07-15 14:00" --priority high --category work --remind "2025-07-15 13:45"

./taskmaster addtask "$USERNAME" "$PASSWORD" --name "读书时间" --start "2025-07-15 20:00" --priority medium --category study

# 显示当天任务
echo "显示当天任务..."
TODAY=$(date +%Y-%m-%d)
./taskmaster showtasks "$USERNAME" "$PASSWORD" day "$TODAY"

# 删除任务（这里用1做示例任务ID，实际需确认ID）
echo "删除任务ID为1的任务..."
./taskmaster deltask "$USERNAME" "$PASSWORD" 1

# 显示王国状态
echo "显示王国状态..."
./taskmaster kingdom "$USERNAME" "$PASSWORD"

echo "=== 测试结束 ==="
